package co.edu.poli.ficb.agl.automatable.gui;

import java.awt.Shape;
import java.awt.geom.Ellipse2D;

import org.apache.commons.collections15.Transformer;

import co.edu.poli.ficb.agl.automatable.graph.Vertice;


public class PA2VertexShapeTransformer implements Transformer<Vertice, Shape>{
	
	private int diametroNodo;
	
	public PA2VertexShapeTransformer(int diametroNodo) {
		this.diametroNodo = diametroNodo;
	}

	@Override
	public Shape transform(Vertice vertice) {
		double radio = diametroNodo;//+6;
		Ellipse2D.Double ellipse = new Ellipse2D.Double(-radio/2, -radio/2, radio, radio);
		return ellipse;
	}

}
